<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>订单中心</title>
    <script type="text/javascript" src="__PUBLIC__/Js/home/jquery-1.11.3.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Js/layer/layer.js"></script>
    <script>
        //要写在user_common.js调用之前     因tp框架中定义的常量，在外部调用的js中不能被解析
        var tp_defined = {'url': '__URL__'};
    </script>
    <script type="text/javascript" src="__PUBLIC__/Js/home/user_common.js"></script>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/home/user_common.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/home/user_main_left.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/Home/order.css">
    <script>
        $(function () {
            //订单按钮 添加事件
            $('.member_all-nav-ul li').each(function (index) {
                $(this).click(function () {
                    $('.member_all-nav-ul li').removeClass();
                    $(this).addClass('member_all-nav-click');
                    if (index == 0) {
                        $('.member_title-table tr:gt(0)').removeAttr('style');
                    } else {
                        var value = index - 1;
                        $('.member_title-table tr:gt(0)').attr('style', 'display:none');
                        $('.member_title-table tr[value=' + value + ']').removeAttr('style');
                    }
                });
            });
        });
    </script>
</head>
<body>
<!--引入页面头部-->
<include file="Common/header"/>
<!--网页主体-->
<div class="cort">
    <div class="tobuy cmain">
        <div class="cmain mb_back">
            <div class="zbk_top spalid">
                <span>您当前的位置：</span>
                <span><a href="__MODULE__/Index/index" target="_top">Darry Ring</a></span>
                <span><em>&gt;</em></span>
                <span><a href="__MODULE__/User/index" target="_top">我的DR</a></span>
                <span><em>&gt;</em></span>
                <span>我的订单</span>
            </div>
            <div class="member_cort">
                <!--引入左导航栏-->
                <include file="Common/user_main_left"/>
                <!--右边的主要内容-->
                <div class="member_cort-right fr">
                    <!--我的订单-->
                    <div class="member_myorder">
                        <!--切换nav-->
                        <div class="member_all-nav">
                            <div class="member_all-nav-top">
                                <ul class="member_all-nav-ul fl">
                                    <li class="member_all-nav-click">全部订单</li>
                                    <li>未付款订单</li>
                                    <li>已付款订单</li>
                                    <li>已发货订单</li>
                                    <li>已收货订单</li>
                                    <li>无效订单</li>
                                </ul>
                            </div>
                            <!--黄色线-->
                            <div class="member_all-nav-line"></div>
                            <!--黄色线end-->
                        </div>
                        <!--切换nav end-->
                        <!--订单-->
                        <div class="member_myorder-allorder">
                            <div class="member_news-it">
                                <table class="member_title-table">
                                    <tr class="member_myorder-table-first">
                                        <td class="myorder-table_td0">订单编号</td>
                                        <td class="myorder-table_td0">订单金额</td>
                                        <td class="myorder-table_td0">订单时间</td>
                                        <td class="myorder-table_td0">订单状态</td>
                                        <td class="myorder-table_td0">操作</td>
                                    </tr>
                                    <!--所有订单-->
                                    <foreach name="orders_data" item="v">
                                        <tr class="member_myorder-all"
                                        <switch name="v['status']">
                                            <case value="0">value="0"</case>
                                            <case value="1">value="1"</case>
                                            <case value="2">value="2"</case>
                                            <case value="3">value="3"</case>
                                            <case value="4">value="4"</case>
                                        </switch>
                                        >
                                        <td>{$v['id']}</td>
                                        <td>￥{$v['total']}</td>
                                        <td>{$v['addtime']}</td>
                                        <td>
                                            <switch name="v['status']">
                                                <case value="0">未付款</case>
                                                <case value="1">已付款</case>
                                                <case value="2">已发货</case>
                                                <case value="3">已收货</case>
                                                <case value="4">无效订单</case>
                                            </switch>
                                        </td>
                                        <td>
                                            <a href="__URL__/orderDetail/orderid/{$v['id']}">订单详情</a>
                                            <switch name="v['status']">
                                                <case value="0">
                                                    &nbsp;&nbsp;|&nbsp;&nbsp;<a href="__URL__/topay/orderid/{$v['id']}">去付款</a>
                                                    &nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:cancelOrder({$v['id']})">取消订单</a>
                                                </case>
                                                <case value="1">
                                                    <!--&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:void(0)">查看物流</a>-->
                                                </case>
                                                <case value="2">
                                                    <!--&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:void(0)">查看物流</a>-->
                                                    &nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:confirmReceipt({$v['id']})">确认收货</a>
                                                </case>
                                                <default/>
                                            </switch>
                                        </td>
                                        </tr>
                                    </foreach>
                                </table>
                            </div>
                        </div>
                        <!--分页-->
                        <div class="page">

                        </div>
                    </div>
                    <!--我的订单end-->
                </div>
                <!--右边的主要内容end-->
            </div>
        </div>
    </div>
</div>
<!--引入页面底部-->
<include file='Common/footer'/>
</body>
</html>


